package com.ray.depot.service;

import java.util.List;

import com.ray.depot.table.dto.StockDto;
import com.ray.depot.table.entity.InOut;
import com.ray.depot.table.entity.InOutRecord;
import com.ray.depot.table.entity.InOutSerialize;
import com.ray.depot.table.entity.Stock;
import com.zjhc.flyhong.common.function.operator.LoginUser;
import com.zjhc.flyhong.common.function.operator.PageDto;
import com.zjhc.flyhong.common.web.Result;

public interface StockService {

	/**
	 * 新增
	 * @param params
	 * @param user
	 * @return
	 */
	Result<Object> addStock(Stock params, LoginUser user);
	
    /**
     * 查询
     * @param id
     * @param user
     * @return
     */
	Stock queryStock(String id, LoginUser user);
	
    /**
     * 修改
     * @param params
     * @param user
     * @return
     */
	Result<Object> updateStock(Stock params, LoginUser user);
	
    /**
     * 删除
     * @param id
     * @param user
     * @return
     */
	Result<Object> deleteStock(String id, LoginUser user);
	
   /**
    * 查询
    * @param params
    * @param page
    * @param user
    * @return
    */
	PageDto<Stock> queryStock(Stock params, PageDto<Stock> page, LoginUser user);
    /**
     * 入库操作
     * @param inOuts
     * @param inOutSerializes
     * @param user
     */
    void storeIn(InOutRecord record ,List<InOut> inOuts, List<InOutSerialize> inOutSerializes, LoginUser user);
    /**
     * 出库操作
     * @param inOuts
     * @param inOutSerializes
     * @param user
     */
    void storeOut(InOutRecord record,List<InOut> inOuts, List<InOutSerialize> inOutSerializes, LoginUser user);
    /**
     * 查询库存详情
     * @param params
     * @param page
     * @param user
     * @return
     */
    PageDto<StockDto> querySelectStock(StockDto params, PageDto<StockDto> page, LoginUser user);
    /**
     * 查询
     * @param materialId
     * @param warchouseId
     * @return
     */
	Stock selectStock(String materialId, String warchouseId);

}
